<?php
include_once '../../../Core/Conexion.php';
include_once '../../../Core/Controlador.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of grabarDeuda
 *
 * @author home
 */
class grabarDeuda extends Controlador
{
    function __construct() 
    {
        parent::__construct();
    }

    
    public function ejecutar() 
    {
            
            //$this->conexion->editar($entidad);
       // echo "UPDATE DEUDA SET SALDODEUDA=".$_REQUEST['saldo'];    
        if($_REQUEST['facturado']=="1")
            $this->conexion->consultaLibre("UPDATE DEUDA SET SALDODEUDA=".$_REQUEST['saldo'].",DEUDAFACTURADA='1' WHERE CODIGODEUDA=".$_REQUEST['codigo']);
        else
            $this->conexion->consultaLibre("UPDATE DEUDA SET SALDODEUDA=".$_REQUEST['saldo']." WHERE CODIGODEUDA=".$_REQUEST['codigo']);
            
    }    
}

$grabar=new grabarDeuda();
$grabar->ejecutar();



?>
